package org.csmzxy.class2333;

import java.util.ArrayList;
import java.util.Iterator;

public class Example06 {
    public static void main(String [] args){
        ArrayList list = new ArrayList();
        list.add(5);
        list.add(20);
        list.add("25");
       int sum = 0 ;
       for (Object obj : list){
           sum += (Integer) obj;
       }
       System.out.println("集合中所有数字的和为" + sum);
    }
}
